﻿Imports DAO
Imports DTO
Public Class KhachHangBUS
    Dim kh As New KhachHangDAO
    Public Function LoaddsKH() As DataTable
        Dim dtKh As New DataTable()
        dtKh = kh.LoadDsKH()
        Return dtKh

    End Function

    Public Function LoaddsKHTheoMA(ByVal makh As Integer) As DataTable
        Dim dt As New DataTable
        dt = kh.LoadDsKHTheoMA(makh)
        Return dt
    End Function

    Sub ThemKH(ByVal khachhang As Object)
        Dim khDAO As New KhachHangDAO()
        khDAO.ThemKH(khachhang)
    End Sub

    Shared Function LayTATCa() As IList
        Dim khDAO As New KhachHangDAO()
        Return khDAO.LayTatCa()
    End Function

    Shared Sub XOA(ByVal id As Integer)
        Dim khDAO As New KhachHangDAO()
        khDAO.Xoa(id)
    End Sub

    Sub capnhap(ByVal KHdto As KhachHangDTO)
        Dim khDAO As New KhachHangDAO()
        khDAO.capnhap(KHdto)
    End Sub

    Shared Function LayTatCaTB() As DataTable
        Dim hdDAO As New KhachHangDAO()
        Return hdDAO.layTatCaTB()
    End Function

    Public Shared Function laytheoid(ByVal id As Integer) As KhachHangDTO
        Dim dthd As New KhachHangDAO()
        Return dthd.LAYTHEOID(id)
    End Function

   

End Class
